package com.example.springboot.mqtt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.springboot.mqtt.entity.CashVip;
import com.example.springboot.mqtt.entity.LotterySsq;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.jdbc.SQL;

@Mapper
public interface CashVipMapper extends BaseMapper<CashVip> {
//    @Select("select * from cash_vip  where is_run=0 limit 1")
    @Select("select * from cash_vip where TIMESTAMPDIFF(HOUR, update_time, NOW()) > 24 limit 1")
     CashVip getAccount();

    @Update("update cash_vip set adv=#{adv}, account=#{account},update_time = now() where username=#{username}")
    int updateAccount(String username, String adv,String account);
}
